package com.lin.linchatgpt.utils;

import cn.hutool.cache.CacheUtil;
import cn.hutool.cache.impl.TimedCache;
import cn.hutool.core.date.DateUnit;

/**
 * Copyright(C),2022年-2022,霖霖
 *
 * @author 霖霖
 * @version 1.0
 * @date 2023/4/3 18:22
 * @Description
 */
public class ApiLocalCache {
    public static long TIMEOUT = 5 * DateUnit.MINUTE.getMillis();

    public static long CLEAN_TIME = 5 * DateUnit.MINUTE.getMillis();

    public static TimedCache<String, String> CACHE = CacheUtil.newTimedCache(TIMEOUT);

    static {
        CACHE.schedulePrune(CLEAN_TIME);
    }
}